package com.example.qihuibao.dao

import androidx.room.*
import com.example.qihuibao.bean.*

@Dao
interface UseDao {
//    @Query("SELECT * FROM UseInfo WHERE phone IN (:field_phone)")
//    fun queryInPhone(field_phone: String): List<UserInfo>?
//
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun save(bean: RspUseDetailBean.Use) : Long

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun saveList(users: List<RspUseDetailBean.Use>) : List<Long>?

    @Query("SELECT * FROM Use")
    fun queryAll(): List<RspUseDetailBean.Use>?
//
//    @Delete
//    fun delete(userInfo: UserInfo)
//
    @Query("DELETE FROM Use")
    fun deleteAll()
}